﻿@model FlyingClub.Models.Flight

@{
    ViewBag.Title = "Edition d'un vol";
}

<h1>@ViewBag.Title</h1>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <p>@Html.LabelFor(model => model.DepartureDate, "Date de départ")@Html.EditorFor(model => model.DepartureDate)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.DepartureDate)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.DepartureAirfield, "Aéroport de départ")@Html.EditorFor(model => model.DepartureAirfield)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.DepartureAirfield)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.ArrivalDate, "Date d'arrivée")@Html.EditorFor(model => model.ArrivalDate)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.ArrivalDate)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.ArrivalAirfield, "Aéroport d'arrivée")@Html.EditorFor(model => model.ArrivalAirfield)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.ArrivalAirfield)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.PilotID, "Pilot")@Html.DropDownList("PilotID", String.Empty)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.PilotID)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.StudentID, "Student")@Html.DropDownList("StudentID", String.Empty)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.StudentID)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.TransactionID, "Transaction")@Html.DropDownList("TransactionID", String.Empty)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.TransactionID)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.PlaneID, "Plane")@Html.DropDownList("PlaneID", String.Empty)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.PlaneID)</p>
    <p class="break-line"></p>
    @Html.HiddenFor(model => model.ID)
    <p><label></label><input type="submit" /><input type="submit" value="Enregistrer" /><label style="width : auto; color : rgb(255, 0, 0);">*Champ requis</label></p>
    <p class="break-line"></p>
}

<div class="link-button">
    <a href="/Flights/List#admin-flights">Retour à la liste des vols</a>
</div>
<div></div>
